package com.cy.pj.sys.dao;

import com.cy.pj.sys.entity.CheckBox;
import com.cy.pj.sys.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface SysRoleDao {
    int getRowCount(@Param("name") String name);

    List<SysRole> findPageObjects(@Param("name") String name,
                                  @Param("startIndex") Integer startIndex,
                                  @Param("pageSize") Integer pageSize);
    //添加
    int insertObject(SysRole entity);
    int insertObjects(
            @Param("roleId")Integer roleId,
            @Param("menuIds")Integer[] menuIds);

    //修改
    SysRole updateObjectById(Integer id);
    int updateObject(SysRole entity);

    //删除
    int deleteObject(Integer id);

    List<CheckBox> findObjects();
}
